package com.taiguan.eis.solution.eiswebservice;

import org.springframework.boot.ExitCodeGenerator;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;

import javax.annotation.PreDestroy;

@SpringBootApplication
public class EisWebserviceApplication {

    private static Object ApplicationContext;

    public static void main(String[] args) {
        SpringApplication.run(EisWebserviceApplication.class, args);
    }

    @PreDestroy
    public static void shutdown() {
        System.out.println("Shutdown MES Application.....");
        int exitCode = SpringApplication.exit((org.springframework.context.ApplicationContext) ApplicationContext,(ExitCodeGenerator)()->-1);
        System.exit(exitCode);
    }
}
